import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import { getDicts } from "@/api/system/dict/data"

import getAuth from 'common/getAuth.js'
import mixin from 'common/global.js'
import tools from 'common/tools.js'
import amapwx from './common/AMapWX_SDK_V1.3.0/amap-wx.130.js'
import interceptor from '@/common/interceptor.js'
import uView from "uview-ui";
import CustomTabbar from './components/CustomTabbar.vue'
Vue.use(plugins)
// #ifdef APP-PLUS
function fixRpxAfterOrientation() {
  // 通知 uni 重新计算 rpx 基准
  uni.$emit('__rpx_recalc__')
  // 保险：再触发一次 resize，让页面重排
  plus.webview.currentWebview().evalJS('window.dispatchEvent(new Event("resize"))')
}
plus.globalEvent.addEventListener('orientationchange', fixRpxAfterOrientation)
// #endif
Vue.component('CustomTabbar', CustomTabbar)
Vue.use(uView);
Vue.prototype.$tools = tools;//工具类
Vue.prototype.$amapwx = amapwx;//高德地图类
// 混入代码
Vue.mixin(mixin)
// #ifdef APP
Vue.prototype.$getAuth = getAuth;//获取权限
// #endif	


Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.getDicts = getDicts

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
